package com.my.ruyi.ssl;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

public class SslClientHandler extends SimpleChannelInboundHandler<String>{

	@Override
	public void channelRead0(ChannelHandlerContext ctx, String msg) throws Exception {
		System.out.println("SslClientHandler-channelRead0:"+msg);
	}

	@Override
	public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
		System.out.println("SslClientHandler-exceptionCaught:");
		cause.printStackTrace();
        ctx.close();
	}
	
}
